package com.zzz.system.domain.systemUser;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
import com.zzz.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.ToString;

/**
 * @BelongsProject: oj-project
 * @BelongsPackage: com.zzz.system.domain.systemUser
 * @Author: zhai
 * @CreateTime: 2025-09-21  13:59
 * @Description: TODO
 * @Version: 1.0
 */
@Data
@ToString
@TableName("tb_sys_user")
public class SystemUser extends BaseEntity {

    @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    private Long userId;
    private String userAccount;
    private String nickName;
    private String password;

    public static void main(String[] args) {
        // 手动生成雪花 ID 的方式（一般不推荐）
        DefaultIdentifierGenerator generator = new DefaultIdentifierGenerator();
        Long id = generator.nextId(null); // 传入实体类 class 或 null
        System.out.println("Generated Snowflake ID: " + id);
    }
}
